//
//  THFileManager.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 HZMengLiao. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface THFileManager : NSObject

+ (instancetype)shareManager;

+ (NSString*)getDocumentPath;

- (BOOL)hqFileExistsAtPath:(NSString*)filePath;

- (BOOL)hqFileExistsAtPath:(NSString*)filePath isDirectory:(BOOL*)isDirectory;

/*创建目录*/
- (BOOL)hqCreateDirectory:(NSString*)dir attribute:(NSDictionary*)attr;

/*创建文件*/
- (BOOL)hqCreateFileAtPath:(NSString*)path content:(NSData*)contentData;

/*删除文件*/
- (void)hqDeleteFileAtPath:(NSString*)path;

/*获取path下面文件夹路径*/
- (NSArray*)contentsOfDirectoryAtPath:(NSString*)pathDir;

+ (BOOL)hqSetSkipBackupAttribute:(NSString *)path;

+ (BOOL)hqAddSkipBackupAttributeToItemAtURL:(NSURL *)URL;

//根据文件名加载Plist，默认位置bundle
- (NSDictionary*)hqLoadDictInfoPlistName:(NSString*)plistName;

- (NSDictionary*)hqLoadDictInfoPlistPath:(NSString *)filePath;

@end

NS_ASSUME_NONNULL_END
